package com.tian.service.impl;

import com.tian.dto.UserCouponAddDto;
import com.tian.dto.UserCouponRecordListRespDto;
import com.tian.dto.UserCouponRecordReqDto;
import com.tian.feign.UserCouponFeignClient;
import com.tian.service.UserCouponService;
import com.tian.util.CommonResult;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author tianwc  公众号：java后端技术全栈、面试专栏
 * @version 1.0.0
 * @date 2023年05月15日 22:57
 * 博客地址：<a href="http://woaijava.cc/">博客地址</a>
 */
@Service("userCouponService")
public class UserCouponServiceImpl implements UserCouponService {

    @Resource
    private UserCouponFeignClient userCouponFeignClient;


    @Override
    public CommonResult<Boolean> receive(UserCouponAddDto userCouponAddDto) {
        // todo 参数校验
        return userCouponFeignClient.receive(userCouponAddDto);
    }

    @Override
    public CommonResult<UserCouponRecordListRespDto> list(UserCouponRecordReqDto userCouponRecordReqDto) {
        // todo 参数校验
        return userCouponFeignClient.list(userCouponRecordReqDto);
    }
}
